<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>应用安装管理</title>
    <jsp:include page="common/common_head.jsp"></jsp:include>


</head>
<body  data-spy="scroll" data-target=".navbar">



<jsp:include page="common/common_banner_app.jsp"></jsp:include>
<div style="height:30px"></div>
<div class="container">


	<table class="table  table-striped table-bordered table-hover " id = "showTable">

		<thead>
			<tr>
				<th>序号</th>
				<th>应用名称</th>
				<th>版本</th>
                <th>安装名称</th>
				<th>操作</th>

			</tr>
		</thead>
		<tbody>
		<c:forEach items="${app}" var="c" varStatus="v">
			<tr>
				<td>${v.index + 1}</td>
                <td>${c.appName}</td>
                <td>
                    <select id="select_${v.index+1}">
                        <c:forEach items="${c.version}" var="subC">
                            <option>${subC}</option>
                        </c:forEach>
                    </select>

                </td>
                <td><input id="${c.appName}_appName" value="${c.appName}"/></td>
                <td>
                    <a onclick="install('select_${v.index+1}','${c.appName}')" href="#" class="btn">安装</a>
                </td>
			</tr>
		</c:forEach>

		</tbody>

	</table>



	<jsp:include page="common/common_js.jsp"></jsp:include>



	<script>

        function install(id,appName){

            var url = "/app/appInstallSelectSlave.html?app="+appName+"&appName=" + $("#"+appName+"_appName").val() + "&version=" + $("#" + id).val()

            location.href = url;


        }



	</script>
</body>
</html>